#include<iostream>

using namespace std;

typedef unsigned int u_int;

class Stu
{
	string _name;
	u_int _num;
	float _score;
	static int cnt;
public:
	Stu();
	Stu(string, u_int, float);
	Stu(const Stu&);
	~Stu();

	string get_name();
	u_int get_num();
	float get_score();
};

int Stu::cnt = 0;

Stu::Stu()
{
	_name = "";
	_num = 0;
	_score = 0.0f;

	cnt++;
	cout << "normal constructor is called, current cnt::"<< cnt << endl;
}

Stu::Stu(string name, u_int num, float score)
{
	_name = name;
	_num = num;
	_score = score;

	cnt++;
	cout << "normal constructor is called, current cnt::" << cnt << endl;
}

Stu::Stu(const Stu& stu)
{
	_name = stu._name;
	_num = stu._num;
	_score = stu._score;

	cnt++;
	cout << "copy constructor is called, current cnt::" << cnt << endl;
}

Stu::~Stu()
{
	cnt--;
	cout << "deconstructor is called, current cnt::" << cnt << endl;
}

string Stu::get_name()
{
	return _name;
}
u_int Stu::get_num()
{
	return _num;
}
float Stu::get_score()
{
	return _score;
}

float score_sum(Stu* s1, Stu& s2)
{
	return s1->get_score() + s2.get_score();
}

int main()
{
	Stu s1("lxb", 27, 99.5f);
	Stu s2 = s1;

	cout << s1.get_name() << endl;

	cout << score_sum(&s1, s2) << endl;

	return 0;
}